<div class="bg-light lter b-b wrapper-md">
	<h1 class="m-n font-thin h3"> <span class="font-bold" translate="aside.nav.query.payment"></span> </h1>
</div>
<div ng-class="isSmart?'':'wrapper-md'" class="remove-wrapper">
	<div class="panel panel-default" style="margin-bottom: 0;">
		<div ng-controller="QueryPaymentController" ng-init="init()">
			<form  class="form-horizontal" style="padding-bottom: 10px;padding-top: 10px;">
				<div class="row">
					<div ng-controller="DatepickerDemoCtrl" class="col-xs-12 col-md-5" style="margin-bottom:5px;">
						<div class="col-xs-12 col-sm-4">
							<label class="control-label" translate="business.servreq.paid_startdate"></label>
						</div>
						<div class="col-xs-12 col-sm-8">
							<div class="input-group">
							<span class="input-group-btn" ng-click="open($event)">
								<button class="btn btn-default">
									<i class="glyphicon glyphicon-calendar"></i>
								</button>
							</span>
								<input type="text" class="form-control text-center" style="min-width: 100px"
									   datepicker-popup="yyyy-MM-dd"
									   is-open="opened"
									   current-text="{{'common.today' | translate}}"
									   clear-text="{{'common.clear' | translate}}"
									   close-text="{{'common.close' | translate}}"
									   datepicker-options="dateOptions"
									   ng-required="true"
									   close-text="Close"
									   ng-model="item.startDate"
									   max-date="item.finishDate"
									   disabled
									   autocomplete="off">
							</div>
						</div>
					</div>
					<div ng-controller="DatepickerDemoCtrl" class="col-xs-12 col-md-5" style="margin-bottom:5px;">
						<div class="col-xs-12 col-sm-4">
							<label class="control-label" translate="business.servreq.paid_enddate"></label>
						</div>
						<div class="col-xs-12 col-sm-8">
							<div class="input-group">
							<span class="input-group-btn" ng-click="open($event)">
								<button class="btn btn-default">
									<i class="glyphicon glyphicon-calendar"></i>
								</button>
							</span>
								<input type="text" class="form-control text-center" style="min-width: 100px"
									   datepicker-popup="yyyy-MM-dd"
									   is-open="opened"
									   current-text="{{'common.today' | translate}}"
									   clear-text="{{'common.clear' | translate}}"
									   close-text="{{'common.close' | translate}}"
									   datepicker-options="dateOptions"
									   ng-required="true"
									   close-text="Close"
									   ng-model="item.finishDate"
									   min-date="item.startDate"
									   max-date="dt"
									   disabled
									   autocomplete="off">
							</div>
						</div>
					</div>
					<div class="col-xs-12 col-md-2">
						<div class="col-xs-12">
							<button class="btn btn-success font-bold" translate="business.navtitle.search_patient" ng-click="query()"></button>
						</div>
					</div>
				</div>
			</form>
			<div style="padding: 10px;">
				<table class="table table-bordered" style="background:#FFF;" >
					<thead >
					<tr class="panel-heading">
						<th class="text-center" translate="common.number">No.</th>
						<th class="text-center" translate="common.name">Username</th>
						<th class="text-center" ng-if="!isSmart" translate="user.icNo">Real Name</th>
						<th class="text-center" ng-if="!isSmart" translate="business.patcase.disease_type">ioqiq</th>
						<th class="text-center" translate="business.servreq.paymentAmount">asdsadsd</th>
						<th class="text-center" translate="business.servreq.paid_Date">userrole</th>
						<th class="text-center" ng-if="!isSmart" translate="business.servreq.medFinance">Mobile</th>
					</tr>
					</thead>
					<tbody>
					<tr ng-repeat="servReq in servReqs" class="text-center">
						<td>{{ $index + 1 }}</td>
						<td>{{servReq._patCase._patient._user.realName}}</td>
						<td ng-if="!isSmart">{{servReq._patCase._patient._user.icNo}}</td>
						<td ng-if="!isSmart" translate="{{'business.patcase.disease_type_' + servReq._diseaseType.desc }}"></td>
						<td>{{servReq.paid_Amount | currency:'￥'}}</td>
						<td>{{servReq.paid_Date == null ? '-' : moment(servReq.paid_Date).format('YYYY-MM-DD')}}</td>
						<td ng-if="!isSmart">{{servReq._med_Finance.realName}}</td>
					</tr>
					<tr class="text-center">
						<td translate="common.summary"></td>
						<td></td>
						<td ng-if="!isSmart"></td>
						<td ng-if="!isSmart"></td>
						<td>{{summaryOfPaid_Amount | currency:'￥'}}</td>
						<td></td>
						<td ng-if="!isSmart"></td>
					</tr>
					</tbody>
				</table>
			</div>
		</div>
	</div>
</div>
